<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">

<title>class SQLRCursor - RDoc Documentation</title>

<script type="text/javascript">
  var rdoc_rel_prefix = "./";
  var index_rel_prefix = "./";
</script>

<script src="./js/navigation.js" defer></script>
<script src="./js/search.js" defer></script>
<script src="./js/search_index.js" defer></script>
<script src="./js/searcher.js" defer></script>
<script src="./js/darkfish.js" defer></script>

<link href="./css/fonts.css" rel="stylesheet">
<link href="./css/rdoc.css" rel="stylesheet">


<body id="top" role="document" class="class">
<nav role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="./index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="./table_of_contents.html#pages">Pages</a>
    <a href="./table_of_contents.html#classes">Classes</a>
    <a href="./table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  

  <div id="class-metadata">
    
    
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link">Object
</div>

    
    
    
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-affectedRows">#affectedRows</a>
    <li ><a href="#method-i-cacheOff">#cacheOff</a>
    <li ><a href="#method-i-cacheToFile">#cacheToFile</a>
    <li ><a href="#method-i-clearBinds">#clearBinds</a>
    <li ><a href="#method-i-closeResultSet">#closeResultSet</a>
    <li ><a href="#method-i-colCount">#colCount</a>
    <li ><a href="#method-i-countBindVariables">#countBindVariables</a>
    <li ><a href="#method-i-defineOutputBindBlob">#defineOutputBindBlob</a>
    <li ><a href="#method-i-defineOutputBindClob">#defineOutputBindClob</a>
    <li ><a href="#method-i-defineOutputBindCursor">#defineOutputBindCursor</a>
    <li ><a href="#method-i-defineOutputBindDouble">#defineOutputBindDouble</a>
    <li ><a href="#method-i-defineOutputBindInteger">#defineOutputBindInteger</a>
    <li ><a href="#method-i-defineOutputBindString">#defineOutputBindString</a>
    <li ><a href="#method-i-dontGetColumnInfo">#dontGetColumnInfo</a>
    <li ><a href="#method-i-endOfResultSet">#endOfResultSet</a>
    <li ><a href="#method-i-errorMessage">#errorMessage</a>
    <li ><a href="#method-i-errorNumber">#errorNumber</a>
    <li ><a href="#method-i-executeQuery">#executeQuery</a>
    <li ><a href="#method-i-fetchFromBindCursor">#fetchFromBindCursor</a>
    <li ><a href="#method-i-firstRowIndex">#firstRowIndex</a>
    <li ><a href="#method-i-getCacheFileName">#getCacheFileName</a>
    <li ><a href="#method-i-getColumnInfo">#getColumnInfo</a>
    <li ><a href="#method-i-getColumnIsAutoIncrement">#getColumnIsAutoIncrement</a>
    <li ><a href="#method-i-getColumnIsBinary">#getColumnIsBinary</a>
    <li ><a href="#method-i-getColumnIsNullable">#getColumnIsNullable</a>
    <li ><a href="#method-i-getColumnIsPartOfKey">#getColumnIsPartOfKey</a>
    <li ><a href="#method-i-getColumnIsPrimaryKey">#getColumnIsPrimaryKey</a>
    <li ><a href="#method-i-getColumnIsUnique">#getColumnIsUnique</a>
    <li ><a href="#method-i-getColumnIsUnsigned">#getColumnIsUnsigned</a>
    <li ><a href="#method-i-getColumnIsZeroFilled">#getColumnIsZeroFilled</a>
    <li ><a href="#method-i-getColumnLength">#getColumnLength</a>
    <li ><a href="#method-i-getColumnList">#getColumnList</a>
    <li ><a href="#method-i-getColumnName">#getColumnName</a>
    <li ><a href="#method-i-getColumnNames">#getColumnNames</a>
    <li ><a href="#method-i-getColumnPrecision">#getColumnPrecision</a>
    <li ><a href="#method-i-getColumnScale">#getColumnScale</a>
    <li ><a href="#method-i-getColumnType">#getColumnType</a>
    <li ><a href="#method-i-getDatabaseList">#getDatabaseList</a>
    <li ><a href="#method-i-getField">#getField</a>
    <li ><a href="#method-i-getFieldAsDouble">#getFieldAsDouble</a>
    <li ><a href="#method-i-getFieldAsInteger">#getFieldAsInteger</a>
    <li ><a href="#method-i-getFieldLength">#getFieldLength</a>
    <li ><a href="#method-i-getLongest">#getLongest</a>
    <li ><a href="#method-i-getNullsAsEmptyStrings">#getNullsAsEmptyStrings</a>
    <li ><a href="#method-i-getNullsAsNils">#getNullsAsNils</a>
    <li ><a href="#method-i-getOutputBindBlob">#getOutputBindBlob</a>
    <li ><a href="#method-i-getOutputBindClob">#getOutputBindClob</a>
    <li ><a href="#method-i-getOutputBindCursor">#getOutputBindCursor</a>
    <li ><a href="#method-i-getOutputBindDouble">#getOutputBindDouble</a>
    <li ><a href="#method-i-getOutputBindInteger">#getOutputBindInteger</a>
    <li ><a href="#method-i-getOutputBindLength">#getOutputBindLength</a>
    <li ><a href="#method-i-getOutputBindString">#getOutputBindString</a>
    <li ><a href="#method-i-getResultSetBufferSize">#getResultSetBufferSize</a>
    <li ><a href="#method-i-getResultSetId">#getResultSetId</a>
    <li ><a href="#method-i-getRow">#getRow</a>
    <li ><a href="#method-i-getRowHash">#getRowHash</a>
    <li ><a href="#method-i-getRowLengths">#getRowLengths</a>
    <li ><a href="#method-i-getRowLengthsHash">#getRowLengthsHash</a>
    <li ><a href="#method-i-getTableList">#getTableList</a>
    <li ><a href="#method-i-inputBind">#inputBind</a>
    <li ><a href="#method-i-inputBindBlob">#inputBindBlob</a>
    <li ><a href="#method-i-inputBindClob">#inputBindClob</a>
    <li ><a href="#method-i-inputBinds">#inputBinds</a>
    <li ><a href="#method-i-lowerCaseColumnNames">#lowerCaseColumnNames</a>
    <li ><a href="#method-i-mixedCaseColumnNames">#mixedCaseColumnNames</a>
    <li ><a href="#method-i-openCachedResultSet">#openCachedResultSet</a>
    <li ><a href="#method-i-prepareFileQuery">#prepareFileQuery</a>
    <li ><a href="#method-i-prepareQuery">#prepareQuery</a>
    <li ><a href="#method-i-prepareQueryWithLength">#prepareQueryWithLength</a>
    <li ><a href="#method-i-resumeCachedResultSet">#resumeCachedResultSet</a>
    <li ><a href="#method-i-resumeResultSet">#resumeResultSet</a>
    <li ><a href="#method-i-rowCount">#rowCount</a>
    <li ><a href="#method-i-sendFileQuery">#sendFileQuery</a>
    <li ><a href="#method-i-sendQuery">#sendQuery</a>
    <li ><a href="#method-i-sendQueryWithLength">#sendQueryWithLength</a>
    <li ><a href="#method-i-setCacheTtl">#setCacheTtl</a>
    <li ><a href="#method-i-setResultSetBufferSize">#setResultSetBufferSize</a>
    <li ><a href="#method-i-substitution">#substitution</a>
    <li ><a href="#method-i-substitutions">#substitutions</a>
    <li ><a href="#method-i-suspendResultSet">#suspendResultSet</a>
    <li ><a href="#method-i-totalRows">#totalRows</a>
    <li ><a href="#method-i-upperCaseColumnNames">#upperCaseColumnNames</a>
    <li ><a href="#method-i-validBind">#validBind</a>
    <li ><a href="#method-i-validateBinds">#validateBinds</a>
  </ul>
</div>

  </div>
</nav>

<main role="main" aria-labelledby="class-SQLRCursor">
  <h1 id="class-SQLRCursor" class="class">
    class SQLRCursor
  </h1>

  <section class="description">
    
  </section>

  <section id="5Buntitled-5D" class="documentation-section">





     <section id="public-class-5Buntitled-5D-method-details" class="method-section">
       <header>
         <h3>Public Class Methods</h3>
       </header>

      <div id="method-c-new" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            new(connection)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Creates a cursor to run queries and fetch result sets using connection “connection”</p>

          <div class="method-source-code" id="new-source">
            <pre>static VALUE sqlrcur_new(VALUE self, VALUE connection) {
        sqlrconnection *sqlrcon;
        Data_Get_Struct(connection,sqlrconnection,sqlrcon);
        sqlrcursor     *sqlrcur=new sqlrcursor(sqlrcon,true);
        sqlrcursordata *curdata=new sqlrcursordata;
        curdata-&gt;cur=sqlrcur;
        curdata-&gt;con=connection;
        return Data_Wrap_Struct(self,sqlrcur_mark,sqlrcur_free,(void *)curdata);
}</pre>
          </div>
        </div>


      </div>

    </section>

     <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
       <header>
         <h3>Public Instance Methods</h3>
       </header>

      <div id="method-i-affectedRows" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">affectedRows</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the number of rows that were updated, inserted or deleted by the query.  Not all databases support this call.  Don&#39;t use it for applications which are designed to be portable across databases.  -1 is returned by databases which don&#39;t support this option.</p>

          <div class="method-source-code" id="affectedRows-source">
            <pre>static VALUE sqlrcur_affectedRows(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        uint64_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,u64r,sqlrcurdata-&gt;cur,affectedRows);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-cacheOff" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">cacheOff</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sets query caching off.</p>

          <div class="method-source-code" id="cacheOff-source">
            <pre>static VALUE sqlrcur_cacheOff(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,cacheOff);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-cacheToFile" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            cacheToFile(filename)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sets query caching on.  Future queries will be cached to the file “filename”.</p>

<p>A default time-to-live of 10 minutes is also set.</p>

<p>Note that once cacheToFile() is called, the result sets of all future queries will be cached to that file until another call to cacheToFile() changes which file to cache to or a call to cacheOff() turns off caching.</p>

          <div class="method-source-code" id="cacheToFile-source">
            <pre>static VALUE sqlrcur_cacheToFile(VALUE self, VALUE filename) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR1(sqlrcurdata-&gt;cur,cacheToFile,filename);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-clearBinds" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">clearBinds</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Clears all bind variables.</p>

          <div class="method-source-code" id="clearBinds-source">
            <pre>static VALUE sqlrcur_clearBinds(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,clearBinds);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-closeResultSet" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">closeResultSet</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Closes the current result set, if one is open.  Data that has been fetched already is still available but no more data may be fetched.  Server side resources for the result set are freed as well.</p>

          <div class="method-source-code" id="closeResultSet-source">
            <pre>static VALUE sqlrcur_closeResultSet(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,closeResultSet);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-colCount" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">colCount</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the number of columns in the current result set.</p>

          <div class="method-source-code" id="colCount-source">
            <pre>static VALUE sqlrcur_colCount(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        uint32_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,u32r,sqlrcurdata-&gt;cur,colCount);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-countBindVariables" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">countBindVariables</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Parses the previously prepared query, counts the number of bind variables defined in it and returns that number.</p>

          <div class="method-source-code" id="countBindVariables-source">
            <pre>static VALUE sqlrcur_countBindVariables(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        uint16_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,u16r,sqlrcurdata-&gt;cur,countBindVariables);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-defineOutputBindBlob" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            defineOuptutBindBlob(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines a binary lob output bind variable</p>

          <div class="method-source-code" id="defineOutputBindBlob-source">
            <pre>static VALUE sqlrcur_defineOutputBindBlob(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR1(sqlrcurdata-&gt;cur,defineOutputBindBlob,variable);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-defineOutputBindClob" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            defineOutputBindClob(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines a character lob output bind variable</p>

          <div class="method-source-code" id="defineOutputBindClob-source">
            <pre>static VALUE sqlrcur_defineOutputBindClob(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR1(sqlrcurdata-&gt;cur,defineOutputBindClob,variable);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-defineOutputBindCursor" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            defineOutputBindCursor(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines a cursor output bind variable</p>

          <div class="method-source-code" id="defineOutputBindCursor-source">
            <pre>static VALUE sqlrcur_defineOutputBindCursor(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR1(sqlrcurdata-&gt;cur,defineOutputBindCursor,variable);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-defineOutputBindDouble" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            defineOutputBindDouble(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines an decimal output bind variable.</p>

          <div class="method-source-code" id="defineOutputBindDouble-source">
            <pre>static VALUE sqlrcur_defineOutputBindDouble(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR1(sqlrcurdata-&gt;cur,defineOutputBindDouble,variable);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-defineOutputBindInteger" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            defineOutputBindInteger(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines an integer output bind variable.</p>

          <div class="method-source-code" id="defineOutputBindInteger-source">
            <pre>static VALUE sqlrcur_defineOutputBindInteger(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR1(sqlrcurdata-&gt;cur,defineOutputBindInteger,variable);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-defineOutputBindString" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            defineOutputBindString(variable,length)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines a string output bind variable. “length” bytes will be reserved to store the value.</p>

          <div class="method-source-code" id="defineOutputBindString-source">
            <pre>static VALUE sqlrcur_defineOutputBindString(VALUE self, VALUE variable,
                                                        VALUE bufferlength) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR2(sqlrcurdata-&gt;cur,defineOutputBindString,variable,bufferlength);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-dontGetColumnInfo" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">dontGetColumnInfo</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Tells the server not to send any column info (names, types, sizes).  If you don&#39;t need that info, you should call this function to improve performance.</p>

          <div class="method-source-code" id="dontGetColumnInfo-source">
            <pre>static VALUE sqlrcur_dontGetColumnInfo(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,dontGetColumnInfo);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-endOfResultSet" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">endOfResultSet</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns 0 if part of the result set is still pending on the server and 1 if not.  This function can only return 0 if setResultSetBufferSize() has been called with a parameter other than 0.</p>

          <div class="method-source-code" id="endOfResultSet-source">
            <pre>static VALUE sqlrcur_endOfResultSet(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,br,sqlrcurdata-&gt;cur,endOfResultSet);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-errorMessage" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">errorMessage</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>If a query failed and generated an error, the error message is available here.  If the query succeeded then this function returns a nil.</p>

          <div class="method-source-code" id="errorMessage-source">
            <pre>static VALUE sqlrcur_errorMessage(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        const char     *result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,ccpr,sqlrcurdata-&gt;cur,curErrorMessage);
        if (result) {
                return rb_str_new2(result);
        } else {
                return Qnil;
        }
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-errorNumber" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">errorNumber</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>If a query failed and generated an error, the error number is available here.  If there is no error then this method returns 0.</p>

          <div class="method-source-code" id="errorNumber-source">
            <pre>static VALUE sqlrcur_errorNumber(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        uint64_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,u64r,sqlrcurdata-&gt;cur,curErrorNumber);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-executeQuery" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">executeQuery</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Execute the query that was previously prepared and bound.</p>

          <div class="method-source-code" id="executeQuery-source">
            <pre>static VALUE sqlrcur_executeQuery(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,br,sqlrcurdata-&gt;cur,executeQuery);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-fetchFromBindCursor" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">fetchFromBindCursor</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Fetch from a cursor that was returned as an output bind variable.</p>

          <div class="method-source-code" id="fetchFromBindCursor-source">
            <pre>static VALUE sqlrcur_fetchFromBindCursor(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,br,sqlrcurdata-&gt;cur,fetchFromBindCursor);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-firstRowIndex" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">firstRowIndex</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the index of the first buffered row.  This is useful when buffering only part of the result set at a time.</p>

          <div class="method-source-code" id="firstRowIndex-source">
            <pre>static VALUE sqlrcur_firstRowIndex(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        uint64_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,u64r,sqlrcurdata-&gt;cur,firstRowIndex);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getCacheFileName" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">getCacheFileName</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the name of the file containing the most recently cached result set.</p>

          <div class="method-source-code" id="getCacheFileName-source">
            <pre>static VALUE sqlrcur_getCacheFileName(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        const char     *result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,ccpr,sqlrcurdata-&gt;cur,getCacheFileName);
        if (result) {
                return rb_str_new2(result);
        } else {
                return Qnil;
        }
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnInfo" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">getColumnInfo</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Tells the server to send column info.</p>

          <div class="method-source-code" id="getColumnInfo-source">
            <pre>static VALUE sqlrcur_getColumnInfo(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,getColumnInfo);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnIsAutoIncrement" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnIsAutoIncrement(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns 1 if the specified column auto-increments and 0 otherwise. “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnIsAutoIncrement-source">
            <pre>static VALUE sqlrcur_getColumnIsAutoIncrement(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsAutoIncrementStr,col);
        } else {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsAutoIncrementInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnIsBinary" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnIsBinary(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns 1 if the specified column contains binary data and 0 otherwise. “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnIsBinary-source">
            <pre>static VALUE sqlrcur_getColumnIsBinary(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsBinaryStr,col);
        } else {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsBinaryInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnIsNullable" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnIsNullable(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns 1 if the specified column can contain nulls and 0 otherwise. “col” may be specified as the colum name or number.</p>

          <div class="method-source-code" id="getColumnIsNullable-source">
            <pre>static VALUE sqlrcur_getColumnIsNullable(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsNullableStr,col);
        } else {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsNullableInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnIsPartOfKey" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnIsPartOfKey(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns 1 if the specified column is part of a composite key and 0 otherwise.  “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnIsPartOfKey-source">
            <pre>static VALUE sqlrcur_getColumnIsPartOfKey(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsPartOfKeyStr,col);
        } else {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsPartOfKeyInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnIsPrimaryKey" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnIsPrimaryKey(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns 1 if the specified column is a primary key and 0 otherwise. “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnIsPrimaryKey-source">
            <pre>static VALUE sqlrcur_getColumnIsPrimaryKey(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsPrimaryKeyStr,col);
        } else {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsPrimaryKeyInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnIsUnique" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnIsUnique(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns 1 if the specified column is unique and 0 otherwise.  “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnIsUnique-source">
            <pre>static VALUE sqlrcur_getColumnIsUnique(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsUniqueStr,col);
        } else {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsUniqueInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnIsUnsigned" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnIsUnsigned(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns 1 if the specified column is an unsigned number and 0 otherwise. “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnIsUnsigned-source">
            <pre>static VALUE sqlrcur_getColumnIsUnsigned(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsUnsignedStr,col);
        } else {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsUnsignedInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnIsZeroFilled" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnIsZeroFilled(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns 1 if the specified column was created with the zero-fill flag and 0 otherwise.  “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnIsZeroFilled-source">
            <pre>static VALUE sqlrcur_getColumnIsZeroFilled(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsZeroFilledStr,col);
        } else {
                RCUR1(result,br,sqlrcurdata-&gt;cur,getColumnIsZeroFilledInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnLength" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnLength(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the length of the specified column. “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnLength-source">
            <pre>static VALUE sqlrcur_getColumnLength(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        uint32_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,u32r,sqlrcurdata-&gt;cur,getColumnLengthStr,col);
        } else {
                RCUR1(result,u32r,sqlrcurdata-&gt;cur,getColumnLengthInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnList" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnList(table,wild)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sends a query that returns a list of columns in the table specified by the “table” parameter matching “wild”.  If wild is empty or nil then a list of all columns will be returned.</p>

          <div class="method-source-code" id="getColumnList-source">
            <pre>static VALUE sqlrcur_getColumnList(VALUE self, VALUE table, VALUE wild) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR2(result,br,sqlrcurdata-&gt;cur,getColumnList,table,wild);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnName" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnName(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the name of the specified column.</p>

          <div class="method-source-code" id="getColumnName-source">
            <pre>static VALUE sqlrcur_getColumnName(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        const char     *result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,ccpr,sqlrcurdata-&gt;cur,getColumnName,col);
        if (result) {
                return rb_str_new2(result);
        } else {
                return Qnil;
        }
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnNames" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">getColumnNames</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns an array of the column names of the current result set.</p>

          <div class="method-source-code" id="getColumnNames-source">
            <pre>static VALUE sqlrcur_getColumnNames(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        sqlrcursor     *sqlrcur;
        const char * const *result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        sqlrcur=sqlrcurdata-&gt;cur;
        RCUR(result,ccpcpr,sqlrcur,getColumnNames);
        if (!result) {
                return Qnil;
        }
        VALUE  nameary=rb_ary_new2(sqlrcur-&gt;colCount());
        for (uint32_t i=0; i&lt;sqlrcur-&gt;colCount(); i++) {
                if (result[i]) {
                        rb_ary_store(nameary,i,rb_str_new2(result[i]));
                } else {
                        rb_ary_store(nameary,i,Qnil);
                }
        }
        return nameary;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnPrecision" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnPrecision(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the precision of the specified column.  Precision is the total number of digits in a number.  eg: 123.45 has a precision of 5.  For non-numeric types, it&#39;s the number of characters in the string.  “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnPrecision-source">
            <pre>static VALUE sqlrcur_getColumnPrecision(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        uint32_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,u32r,sqlrcurdata-&gt;cur,getColumnPrecisionStr,col);
        } else {
                RCUR1(result,u32r,sqlrcurdata-&gt;cur,getColumnPrecisionInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnScale" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnScale(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the scale of the specified column.  Scale is the total number of digits to the right of the decimal point in a number.  eg: 123.45 has a scale of 2.  “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnScale-source">
            <pre>static VALUE sqlrcur_getColumnScale(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        uint32_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,u64r,sqlrcurdata-&gt;cur,getColumnScaleStr,col);
        } else {
                RCUR1(result,u64r,sqlrcurdata-&gt;cur,getColumnScaleInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getColumnType" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getColumnType(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the type of the specified column. “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getColumnType-source">
            <pre>static VALUE sqlrcur_getColumnType(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        const char     *result;
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,ccpr,sqlrcurdata-&gt;cur,getColumnTypeStr,col);
        } else {
                RCUR1(result,ccpr,sqlrcurdata-&gt;cur,getColumnTypeInt,col);
        }
        if (result) {
                return rb_str_new2(result);
        } else {
                return Qnil;
        }
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getDatabaseList" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getDatabaseList(wild)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sends a query that returns a list of databases/schemas matching “wild”. If wild is empty or nil then a list of all databases/schemas will be returned.</p>

          <div class="method-source-code" id="getDatabaseList-source">
            <pre>static VALUE sqlrcur_getDatabaseList(VALUE self, VALUE wild) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,br,sqlrcurdata-&gt;cur,getDatabaseList,wild);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getField" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getField(row,col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the specified field as a string.  “col” may be specified as the  column name or number.</p>

          <div class="method-source-code" id="getField-source">
            <pre>static VALUE sqlrcur_getField(VALUE self, VALUE row, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        const char     *result;
        uint64_t       length;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR2(result,ccpr,sqlrcurdata-&gt;cur,getFieldStr,row,col);
                RCUR2(length,u64r,sqlrcurdata-&gt;cur,getFieldLengthStr,row,col);
        } else {
                RCUR2(result,ccpr,sqlrcurdata-&gt;cur,getFieldInt,row,col);
                RCUR2(length,u64r,sqlrcurdata-&gt;cur,getFieldLengthInt,row,col);
        }
        if (result) {
                return rb_str_new(result,length);
        } else {
                return Qnil;
        }
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getFieldAsDouble" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getFieldAsDouble(row,col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the specified field as an decimal.  “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getFieldAsDouble-source">
            <pre>static VALUE sqlrcur_getFieldAsDouble(VALUE self, VALUE row, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        double result;
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR2(result,dr,sqlrcurdata-&gt;cur,getFieldAsDoubleStr,row,col);
        } else {
                RCUR2(result,dr,sqlrcurdata-&gt;cur,getFieldAsDoubleInt,row,col);
        }
        return rb_float_new(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getFieldAsInteger" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getFieldAsInteger(row,col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the specified field as an integer.  “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getFieldAsInteger-source">
            <pre>static VALUE sqlrcur_getFieldAsInteger(VALUE self, VALUE row, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        int64_t        result;
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR2(result,i64r,sqlrcurdata-&gt;cur,getFieldAsIntegerStr,row,col);
        } else {
                RCUR2(result,i64r,sqlrcurdata-&gt;cur,getFieldAsIntegerInt,row,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getFieldLength" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getFieldLength(row,col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the length of the specified row and column.  “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getFieldLength-source">
            <pre>static VALUE sqlrcur_getFieldLength(VALUE self, VALUE row, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        uint64_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR2(result,u64r,sqlrcurdata-&gt;cur,getFieldLengthStr,row,col);
        } else {
                RCUR2(result,u64r,sqlrcurdata-&gt;cur,getFieldLengthInt,row,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getLongest" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getLongest(col)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the length of the longest field in the specified column. “col” may be specified as the column name or number.</p>

          <div class="method-source-code" id="getLongest-source">
            <pre>static VALUE sqlrcur_getLongest(VALUE self, VALUE col) {
        sqlrcursordata *sqlrcurdata;
        uint64_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(col,rb_cString)==Qtrue) {
                RCUR1(result,u64r,sqlrcurdata-&gt;cur,getLongestStr,col);
        } else {
                RCUR1(result,u64r,sqlrcurdata-&gt;cur,getLongestInt,col);
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getNullsAsEmptyStrings" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">getNullsAsEmptyStrings</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Tells the connection to return NULL fields and output bind variables as empty strings.  This is the default.</p>

          <div class="method-source-code" id="getNullsAsEmptyStrings-source">
            <pre>static VALUE sqlrcur_getNullsAsEmptyStrings(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,getNullsAsEmptyStrings);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getNullsAsNils" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">getNullsAsNils</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Tells the connection to return NULL fields and output bind variables as nil&#39;s.</p>

          <div class="method-source-code" id="getNullsAsNils-source">
            <pre>static VALUE sqlrcur_getNullsAsNils(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,getNullsAsNulls);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getOutputBindBlob" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getOutputBindBlob(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Get the value stored in a previously defined binary lob output bind variable.</p>

          <div class="method-source-code" id="getOutputBindBlob-source">
            <pre>static VALUE sqlrcur_getOutputBindBlob(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        const char     *result;
        uint64_t       length;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,ccpr,sqlrcurdata-&gt;cur,getOutputBindBlob,variable);
        RCUR1(length,u64r,sqlrcurdata-&gt;cur,getOutputBindLength,variable);
        if (result) {
                return rb_str_new(result,length);
        } else {
                return Qnil;
        }
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getOutputBindClob" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getOutputBindClob(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Get the value stored in a previously defined character lob output bind variable.</p>

          <div class="method-source-code" id="getOutputBindClob-source">
            <pre>static VALUE sqlrcur_getOutputBindClob(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        const char     *result;
        long           length;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,ccpr,sqlrcurdata-&gt;cur,getOutputBindClob,variable);
        RCUR1(length,u64r,sqlrcurdata-&gt;cur,getOutputBindLength,variable);
        if (result) {
                return rb_str_new(result,length);
        } else {
                return Qnil;
        }
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getOutputBindCursor" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getOutputBindCursor(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Get the cursor associated with a previously defined output bind variable.</p>

          <div class="method-source-code" id="getOutputBindCursor-source">
            <pre>static VALUE sqlrcur_getOutputBindCursor(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        sqlrcursor     *result;
        RCUR1(result,scr,sqlrcurdata-&gt;cur,getOutputBindCursor,variable);
        sqlrcursordata *resultdata=new sqlrcursordata;
        resultdata-&gt;con=sqlrcurdata-&gt;con;
        resultdata-&gt;cur=result;
        return Data_Wrap_Struct(csqlrcursor,sqlrcur_mark,sqlrcur_free,
                                                        (void *)resultdata);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getOutputBindDouble" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getOutputBindDouble(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Get the value stored in a previously defined decimal output bind variable.</p>

          <div class="method-source-code" id="getOutputBindDouble-source">
            <pre>static VALUE sqlrcur_getOutputBindDouble(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        double         result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,dr,sqlrcurdata-&gt;cur,getOutputBindDouble,variable);
        return rb_float_new(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getOutputBindInteger" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getOutputBindInteger(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Get the value stored in a previously defined integer output bind variable.</p>

          <div class="method-source-code" id="getOutputBindInteger-source">
            <pre>static VALUE sqlrcur_getOutputBindInteger(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        int64_t                result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,i64r,sqlrcurdata-&gt;cur,getOutputBindInteger,variable);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getOutputBindLength" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getOutputBindLength(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Get the length of the value stored in a previously defined output bind variable.</p>

          <div class="method-source-code" id="getOutputBindLength-source">
            <pre>static VALUE sqlrcur_getOutputBindLength(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        uint64_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,u64r,sqlrcurdata-&gt;cur,getOutputBindLength,variable);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getOutputBindString" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getOutputBindString(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Get the value stored in a previously defined string output bind variable.</p>

          <div class="method-source-code" id="getOutputBindString-source">
            <pre>static VALUE sqlrcur_getOutputBindString(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        const char     *result;
        uint64_t       length;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,ccpr,sqlrcurdata-&gt;cur,getOutputBindString,variable);
        RCUR1(length,u64r,sqlrcurdata-&gt;cur,getOutputBindLength,variable);
        if (result) {
                return rb_str_new(result,length);
        } else {
                return Qnil;
        }
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getResultSetBufferSize" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">getResultSetBufferSize</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the number of result set rows that will be buffered at a time or 0 for the entire result set.</p>

          <div class="method-source-code" id="getResultSetBufferSize-source">
            <pre>static VALUE sqlrcur_getResultSetBufferSize(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        uint64_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,u64r,sqlrcurdata-&gt;cur,getResultSetBufferSize);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getResultSetId" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">getResultSetId</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the internal ID of this result set.  This parameter may be passed to another statement for use in the resumeResultSet() function.  Note: The value this function returns is only valid after a call to suspendResultSet().</p>

          <div class="method-source-code" id="getResultSetId-source">
            <pre>static VALUE sqlrcur_getResultSetId(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        uint16_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,u16r,sqlrcurdata-&gt;cur,getResultSetId);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getRow" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getRow(row)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns an array of the values of the fields in the specified row.</p>

          <div class="method-source-code" id="getRow-source">
            <pre>static VALUE sqlrcur_getRow(VALUE self, VALUE row) {
        sqlrcursordata *sqlrcurdata;
        sqlrcursor     *sqlrcur;
        const char * const *result;
        uint32_t       *length;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        sqlrcur=sqlrcurdata-&gt;cur;
        VALUE  fieldary=rb_ary_new2(sqlrcur-&gt;colCount());
        RCUR1(result,ccpcpr,sqlrcur,getRow,row);
        RCUR1(length,u32pr,sqlrcur,getRowLengths,row);
        for (uint32_t i=0; i&lt;sqlrcur-&gt;colCount(); i++) {
                if (result[i]) {
                        rb_ary_store(fieldary,i,rb_str_new(result[i],
                                                                length[i]));
                } else {
                        rb_ary_store(fieldary,i,Qnil);
                }
        }
        return fieldary;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getRowHash" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getRowHash(row)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns a hash of the values of the fields in the specified row.</p>

          <div class="method-source-code" id="getRowHash-source">
            <pre>static VALUE sqlrcur_getRowHash(VALUE self, VALUE row) {
        sqlrcursordata *sqlrcurdata;
        sqlrcursor     *sqlrcur;
        const char * const *result;
        uint32_t       *length;
        const char     *name;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        sqlrcur=sqlrcurdata-&gt;cur;
        RCUR1(result,ccpcpr,sqlrcur,getRow,row);
        RCUR1(length,u32pr,sqlrcur,getRowLengths,row);
        VALUE  fieldhash=rb_hash_new();
        for (uint32_t i=0; i&lt;sqlrcur-&gt;colCount(); i++) {
                RCUR1(name,ccpr,sqlrcur,getColumnName,INT2NUM(i));
                if (result[i]) {
                        rb_hash_aset(fieldhash,
                                        rb_str_new2(name),
                                        rb_str_new(result[i],length[i]));
                } else {
                        rb_hash_aset(fieldhash,
                                        rb_str_new2(name),
                                        Qnil);
                }
        }
        return fieldhash;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getRowLengths" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getRowLengths(row)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns an array of the lengths of the fields in the specified row.</p>

          <div class="method-source-code" id="getRowLengths-source">
            <pre>static VALUE sqlrcur_getRowLengths(VALUE self, VALUE row) {
        sqlrcursordata *sqlrcurdata;
        sqlrcursor     *sqlrcur;
        uint32_t       *result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        sqlrcur=sqlrcurdata-&gt;cur;
        RCUR1(result,u32pr,sqlrcur,getRowLengths,row);
        if (!result) {
                return Qnil;
        }
        VALUE  lengthary=rb_ary_new2(sqlrcur-&gt;colCount());
        for (uint32_t i=0; i&lt;sqlrcur-&gt;colCount(); i++) {
                rb_ary_store(lengthary,i,INT2NUM(result[i]));
        }
        return lengthary;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getRowLengthsHash" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getRowLengthsHash(row)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns a hash of the lengths of the fields in the specified row.</p>

          <div class="method-source-code" id="getRowLengthsHash-source">
            <pre>static VALUE sqlrcur_getRowLengthsHash(VALUE self, VALUE row) {
        sqlrcursordata *sqlrcurdata;
        sqlrcursor     *sqlrcur;
        uint32_t       *result;
        const char     *name;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        sqlrcur=sqlrcurdata-&gt;cur;
        RCUR1(result,u32pr,sqlrcur,getRowLengths,row);
        VALUE  lengthhash=rb_hash_new();
        for (uint32_t i=0; i&lt;sqlrcur-&gt;colCount(); i++) {
                RCUR1(name,ccpr,sqlrcur,getColumnName,INT2NUM(i));
                rb_hash_aset(lengthhash,
                                rb_str_new2(name),
                                INT2NUM(result[i]));
        }
        return lengthhash;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-getTableList" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            getTableList(wild)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sends a query that returns a list of tables matching “wild”.  If wild is empty or nil then a list of all tables will be returned.</p>

          <div class="method-source-code" id="getTableList-source">
            <pre>static VALUE sqlrcur_getTableList(VALUE self, VALUE wild) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,br,sqlrcurdata-&gt;cur,getTableList,wild);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-inputBind" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            inputBind(variable,value,(precision),(scale))
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines am input bind variable.  The value may be a string, integer or decimal.  If it is a decimal then the precision and scale may be specified. If you don&#39;t have the precision and scale then set them both to 0.  However in that case you may get unexpected rounding behavior if the server is faking binds.</p>

          <div class="method-source-code" id="inputBind-source">
            <pre>static VALUE sqlrcur_inputBind(int argc, VALUE *argv, VALUE self) {
        sqlrcursordata *sqlrcurdata;
        VALUE  variable;
        VALUE  value;
        VALUE  precision;
        VALUE  scale;
        bool   success=true;
        rb_scan_args(argc,argv,&quot;22&quot;,&amp;variable,&amp;value,&amp;precision,&amp;scale);
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
                if ((rb_obj_is_instance_of(precision,rb_cBignum)==Qtrue ||
                        rb_obj_is_instance_of(precision,rb_cFixnum)==Qtrue ||
                        rb_obj_is_instance_of(precision,rb_cInteger)==Qtrue ||
                        rb_obj_is_instance_of(precision,rb_cNumeric)==Qtrue) &amp;&amp; 
                        NUM2INT(precision)&gt;0) {
                        // in this case, the precision parameter is actually
                        // the string length
                        CUR3(sqlrcurdata-&gt;cur,inputBindStrLen,variable,value,precision);
                } else {
                        CUR2(sqlrcurdata-&gt;cur,inputBindStr,variable,value);
                }
        } else if (rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cFixnum)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cNumeric)==Qtrue) {
                CUR2(sqlrcurdata-&gt;cur,inputBindInt,variable,value);
        } else if (rb_obj_is_instance_of(value,rb_cFloat)==Qtrue) {
                CUR4(sqlrcurdata-&gt;cur,inputBindDbl,variable,value,precision,scale);
        } else if (rb_obj_is_instance_of(value,rb_cNilClass)==Qtrue) {
                CUR1(sqlrcurdata-&gt;cur,inputBindNull,variable);
        } else {
                success=false;
        }
        return INT2NUM(success);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-inputBindBlob" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            inputBindBlob(variable,value,size)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines a binary lob input bind variable.</p>

          <div class="method-source-code" id="inputBindBlob-source">
            <pre>static VALUE sqlrcur_inputBindBlob(VALUE self, VALUE variable,
                                        VALUE value, VALUE size) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        bool   success=true;
        if (value==Qnil) {
                CUR2(sqlrcurdata-&gt;cur,inputBindBlobNull,variable,size);
        } else if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
                CUR3(sqlrcurdata-&gt;cur,inputBindBlob,variable,value,size);
        } else {
                success=false;
        }
        return INT2NUM(success);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-inputBindClob" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            inputBindClob(variable,value,size)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines a character lob input bind variable.</p>

          <div class="method-source-code" id="inputBindClob-source">
            <pre>static VALUE sqlrcur_inputBindClob(VALUE self, VALUE variable,
                                        VALUE value, VALUE size) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        bool   success=true;
        if (value==Qnil) {
                CUR2(sqlrcurdata-&gt;cur,inputBindClobNull,variable,size);
        } else if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
                CUR3(sqlrcurdata-&gt;cur,inputBindClob,variable,value,size);
        } else {
                success=false;
        }
        return INT2NUM(success);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-inputBinds" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            inputBinds(variables,values,(precisions),(scales))
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines an array of input bind variables.  The values may be strings, integers or decimals.  If they are decimals then the precisions and scales may also be specified.</p>

          <div class="method-source-code" id="inputBinds-source">
            <pre>static VALUE sqlrcur_inputBinds(int argc, VALUE *argv, VALUE self) {
        sqlrcursordata *sqlrcurdata;
        VALUE  variables;
        VALUE  values;
        VALUE  precisions;
        VALUE  scales;
        int    argcount=rb_scan_args(argc,argv,&quot;22&quot;,
                                &amp;variables,&amp;values,&amp;precisions,&amp;scales);
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (variables==Qnil || values==Qnil) {
                return Qnil;
        }
        VALUE  variable;
        VALUE  value;
        VALUE  precision=0;
        VALUE  scale=0;
        bool   success=true;
        for (;;) {
                variable=rb_ary_shift(variables);
                if (variable==Qnil) {
                        break;
                }
                value=rb_ary_shift(values);
                if (argcount==4) {
                        precision=rb_ary_shift(precisions);
                        scale=rb_ary_shift(scales);
                }
                if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
                        CUR2(sqlrcurdata-&gt;cur,inputBindStr,variable,value);
                } else if (rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cFixnum)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cNumeric)==Qtrue) {
                        CUR2(sqlrcurdata-&gt;cur,inputBindInt,variable,value);
                } else if (rb_obj_is_instance_of(value,rb_cFloat)==Qtrue) {
                        CUR4(sqlrcurdata-&gt;cur,inputBindDbl,variable,
                                                value,precision,scale);
                } else if (rb_obj_is_instance_of(value,rb_cNilClass)==Qtrue) {
                        CUR1(sqlrcurdata-&gt;cur,inputBindNull,variable);
                } else {
                        success=false;
                }
        }
        return INT2NUM(success);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-lowerCaseColumnNames" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">lowerCaseColumnNames</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Columns names are converted to lower case.</p>

          <div class="method-source-code" id="lowerCaseColumnNames-source">
            <pre>static VALUE sqlrcur_lowerCaseColumnNames(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,lowerCaseColumnNames);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-mixedCaseColumnNames" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">mixedCaseColumnNames</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Columns names are returned in the same case as they are defined in the database.  This is the default.</p>

          <div class="method-source-code" id="mixedCaseColumnNames-source">
            <pre>static VALUE sqlrcur_mixedCaseColumnNames(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,mixedCaseColumnNames);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-openCachedResultSet" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            openCachedResultSet(filename)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Opens a cached result set.  Returns 1 on success and 0 on failure.</p>

          <div class="method-source-code" id="openCachedResultSet-source">
            <pre>static VALUE sqlrcur_openCachedResultSet(VALUE self, VALUE filename) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,br,sqlrcurdata-&gt;cur,openCachedResultSet,filename);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-prepareFileQuery" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            prepareFileQuery(path,filename)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Prepare to execute the contents of “path”/“filename”.</p>

          <div class="method-source-code" id="prepareFileQuery-source">
            <pre>static VALUE sqlrcur_prepareFileQuery(VALUE self, VALUE path, VALUE filename) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR2(result,br,sqlrcurdata-&gt;cur,prepareFileQuery,path,filename);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-prepareQuery" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            prepareQuery(query)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Prepare to execute “query”.</p>

          <div class="method-source-code" id="prepareQuery-source">
            <pre>static VALUE sqlrcur_prepareQuery(VALUE self, VALUE query) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR1(sqlrcurdata-&gt;cur,prepareQuery,query);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-prepareQueryWithLength" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            prepareQuery(query,length)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Prepare to execute “query” with length “length”.  This function must be used if the query contains binary data.</p>

          <div class="method-source-code" id="prepareQueryWithLength-source">
            <pre>static VALUE sqlrcur_prepareQueryWithLength(VALUE self,
                                        VALUE query, VALUE length) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR2(sqlrcurdata-&gt;cur,prepareQueryWithLength,query,length);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-resumeCachedResultSet" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            resumeCachedResultSet(id,filename)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Resumes a result set previously left open using suspendSession() and continues caching the result set to “filename”.  Returns 1 on success and 0 on failure.</p>

          <div class="method-source-code" id="resumeCachedResultSet-source">
            <pre>static VALUE sqlrcur_resumeCachedResultSet(VALUE self, 
                                                VALUE id, VALUE filename) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR2(result,br,sqlrcurdata-&gt;cur,resumeCachedResultSet,id,filename);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-resumeResultSet" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            resumeResultSet(id)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Resumes a result set previously left open using suspendSession(). Returns 1 on success and 0 on failure.</p>

          <div class="method-source-code" id="resumeResultSet-source">
            <pre>static VALUE sqlrcur_resumeResultSet(VALUE self, VALUE id) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,br,sqlrcurdata-&gt;cur,resumeResultSet,id);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-rowCount" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">rowCount</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the number of rows in the current result set.</p>

          <div class="method-source-code" id="rowCount-source">
            <pre>static VALUE sqlrcur_rowCount(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        uint64_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,u32r,sqlrcurdata-&gt;cur,rowCount);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-sendFileQuery" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            sendFileQuery(path,filename)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sends the query in file “path”/“filename” and gets a result set.</p>

          <div class="method-source-code" id="sendFileQuery-source">
            <pre>static VALUE sqlrcur_sendFileQuery(VALUE self, VALUE path, VALUE filename) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR2(result,br,sqlrcurdata-&gt;cur,sendFileQuery,path,filename);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-sendQuery" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            sendQuery(query)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sends “query” directly and gets a result set.</p>

          <div class="method-source-code" id="sendQuery-source">
            <pre>static VALUE sqlrcur_sendQuery(VALUE self, VALUE query) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,br,sqlrcurdata-&gt;cur,sendQuery,query);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-sendQueryWithLength" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            sendQueryWithLength(query,length)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sends “query” with length “length” directly and gets a result set. This function must be used if the query contains binary data.</p>

          <div class="method-source-code" id="sendQueryWithLength-source">
            <pre>static VALUE sqlrcur_sendQueryWithLength(VALUE self,
                                        VALUE query, VALUE length) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR2(result,br,sqlrcurdata-&gt;cur,sendQueryWithLength,query,length);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-setCacheTtl" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            setCacheTtl(ttl)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sets the time-to-live for cached result sets. The sqlr-cachemanger will remove each cached result set “ttl” seconds after it&#39;s created, provided it&#39;s scanning the directory containing the cache files.</p>

          <div class="method-source-code" id="setCacheTtl-source">
            <pre>static VALUE sqlrcur_setCacheTtl(VALUE self, VALUE ttl) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR1(sqlrcurdata-&gt;cur,setCacheTtl,ttl);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-setResultSetBufferSize" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            setResultSetBufferSize(rows)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Sets the number of rows of the result set to buffer at a time. 0 (the default) means buffer the entire result set.</p>

          <div class="method-source-code" id="setResultSetBufferSize-source">
            <pre>static VALUE sqlrcur_setResultSetBufferSize(VALUE self, VALUE rows) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR1(sqlrcurdata-&gt;cur,setResultSetBufferSize,rows);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-substitution" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            substitution(variable,value,(precision),(scale))
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines a substitution variable.  The value may be a string, integer or decimal.  If it is a decimal then the precision and scale may be specified.</p>

          <div class="method-source-code" id="substitution-source">
            <pre>static VALUE sqlrcur_substitution(int argc, VALUE *argv, VALUE self) {
        sqlrcursordata *sqlrcurdata;
        VALUE  variable;
        VALUE  value;
        VALUE  precision;
        VALUE  scale;
        bool   result=true;
        rb_scan_args(argc,argv,&quot;22&quot;,&amp;variable,&amp;value,&amp;precision,&amp;scale);
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
                CUR2(sqlrcurdata-&gt;cur,substitutionStr,variable,value);
        } else if (rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cFixnum)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cNumeric)==Qtrue) {
                CUR2(sqlrcurdata-&gt;cur,substitutionInt,variable,value);
        } else if (rb_obj_is_instance_of(value,rb_cFloat)==Qtrue) {
                CUR4(sqlrcurdata-&gt;cur,substitutionDbl,variable,value,precision,scale);
        } else if (rb_obj_is_instance_of(value,rb_cNilClass)==Qtrue) {
                CUR1(sqlrcurdata-&gt;cur,substitutionNull,variable);
        } else {
                result=false;
        }
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-substitutions" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            substitutions(variables,values,(precisions),(scales))
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Defines an array of substitution variables.  The values may be strings, integers or decimals.  If they are decimals then the precisions and scales may also be specified.</p>

          <div class="method-source-code" id="substitutions-source">
            <pre>static VALUE sqlrcur_substitutions(int argc, VALUE *argv, VALUE self) {
        sqlrcursordata *sqlrcurdata;
        VALUE  variables;
        VALUE  values;
        VALUE  precisions;
        VALUE  scales;
        int    argcount=rb_scan_args(argc,argv,&quot;22&quot;,
                                        &amp;variables,&amp;values,&amp;precisions,&amp;scales);
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        if (variables==Qnil || values==Qnil) {
                return Qnil;
        }
        VALUE  variable;
        VALUE  value;
        VALUE  precision=0;
        VALUE  scale=0;
        bool   success=true;
        for (;;) {
                variable=rb_ary_shift(variables);
                if (variable==Qnil) {
                        break;
                }
                value=rb_ary_shift(values);
                if (argcount==4) {
                        precision=rb_ary_shift(precisions);
                        scale=rb_ary_shift(scales);
                }
                if (rb_obj_is_instance_of(value,rb_cString)==Qtrue) {
                        CUR2(sqlrcurdata-&gt;cur,substitutionStr,variable,value);
                } else if (rb_obj_is_instance_of(value,rb_cBignum)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cFixnum)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cInteger)==Qtrue ||
                        rb_obj_is_instance_of(value,rb_cNumeric)==Qtrue) {
                        CUR2(sqlrcurdata-&gt;cur,substitutionInt,variable,value);
                } else if (rb_obj_is_instance_of(value,rb_cFloat)==Qtrue) {
                        CUR4(sqlrcurdata-&gt;cur,substitutionDbl,variable,
                                                value,precision,scale);
                } else if (rb_obj_is_instance_of(value,rb_cNilClass)==Qtrue) {
                        CUR1(sqlrcurdata-&gt;cur,substitutionNull,variable);
                } else {
                        success=false;
                }
        }
        return INT2NUM(success);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-suspendResultSet" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">suspendResultSet</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Tells the server to leave this result set open when the connection calls suspendSession() so that another connection can connect to it using resumeResultSet() after it calls resumeSession().</p>

          <div class="method-source-code" id="suspendResultSet-source">
            <pre>static VALUE sqlrcur_suspendResultSet(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,suspendResultSet);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-totalRows" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">totalRows</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns the total number of rows that will be returned in the result set. Not all databases support this call.  Don&#39;t use it for applications which are designed to be portable across databases.  -1 is returned by databases which don&#39;t support this option.</p>

          <div class="method-source-code" id="totalRows-source">
            <pre>static VALUE sqlrcur_totalRows(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        uint64_t       result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR(result,u64r,sqlrcurdata-&gt;cur,totalRows);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-upperCaseColumnNames" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">upperCaseColumnNames</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Columns names are converted to upper case.</p>

          <div class="method-source-code" id="upperCaseColumnNames-source">
            <pre>static VALUE sqlrcur_upperCaseColumnNames(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,upperCaseColumnNames);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-validBind" class="method-detail ">
        <div class="method-heading">
          <span class="method-callseq">
            validBind(variable)
          </span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>Returns true if “variable” was a valid bind variable of the query.</p>

          <div class="method-source-code" id="validBind-source">
            <pre>static VALUE sqlrcur_validBind(VALUE self, VALUE variable) {
        sqlrcursordata *sqlrcurdata;
        bool           result;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        RCUR1(result,br,sqlrcurdata-&gt;cur,validBind,variable);
        return INT2NUM(result);
}</pre>
          </div>
        </div>


      </div>

      <div id="method-i-validateBinds" class="method-detail ">
        <div class="method-heading">
          <span class="method-name">validateBinds</span><span
            class="method-args">()</span>
          <span class="method-click-advice">click to toggle source</span>
        </div>

        <div class="method-description">
          <p>If you are binding to any variables that might not actually be in your query, call this to ensure that the database won&#39;t try to bind them unless they really are in the query.  There is a performance penalty for calling this function</p>

          <div class="method-source-code" id="validateBinds-source">
            <pre>static VALUE sqlrcur_validateBinds(VALUE self) {
        sqlrcursordata *sqlrcurdata;
        Data_Get_Struct(self,sqlrcursordata,sqlrcurdata);
        CUR(sqlrcurdata-&gt;cur,validateBinds);
        return Qnil;
}</pre>
          </div>
        </div>


      </div>

    </section>

  </section>
</main>


<footer id="validator-badges" role="contentinfo">
  <p><a href="https://validator.w3.org/check/referer">Validate</a>
  <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.3.
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>

